﻿.region-agent {
	padding: 20rpx;
	background: #f6f6f6;
	min-height: 100vh;
}

// 加载状态样式
.loading-container {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 60vh;
	background: #f6f6f6;
}

.loading-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.loading-spinner {
	width: 60rpx;
	height: 60rpx;
	border: 4rpx solid #e0e0e0;
	border-top: 4rpx solid #007aff;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 20rpx;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.loading-text {
	font-size: 28rpx;
	color: #666;
}

.agent-status-card {
	background: #fff;
	border-radius: 16rpx;
	padding: 30rpx;
	margin-bottom: 20rpx;
	box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}

.status-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20rpx;
}

.status-title {
	font-size: 32rpx;
	font-weight: bold;
	color: #333;
}

.status-badge {
	padding: 8rpx 16rpx;
	border-radius: 20rpx;
	font-size: 24rpx;
	color: #fff;
	
	&.status-pending {
		background: #ff9500;
	}
	
	&.status-approved {
		background: #34c759;
	}
	
	&.status-rejected {
		background: #ff3b30;
	}
}

.status-content {
	.info-row {
		display: flex;
		align-items: center;
		margin-bottom: 16rpx;
		
		.label {
			font-size: 28rpx;
			color: #666;
			width: 160rpx;
		}
		
		.value {
			font-size: 28rpx;
			color: #333;
			flex: 1;
		}
	}
}

.income-stats {
	background: #fff;
	border-radius: 16rpx;
	padding: 30rpx;
	margin-bottom: 20rpx;
	box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}

.stats-title {
	font-size: 32rpx;
	font-weight: bold;
	color: #333;
	margin-bottom: 20rpx;
}

.stats-grid {
	display: flex;
	justify-content: space-around;
}

.stats-item {
	text-align: center;
	
	.stats-value {
		font-size: 36rpx;
		font-weight: bold;
		color: #ff6b35;
		margin-bottom: 8rpx;
	}
	
	.stats-label {
		font-size: 24rpx;
		color: #666;
	}
}

.apply-form {
	background: #fff;
	border-radius: 16rpx;
	padding: 30rpx;
	margin-bottom: 20rpx;
	box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}

.form-title {
	font-size: 32rpx;
	font-weight: bold;
	color: #333;
	margin-bottom: 30rpx;
	text-align: center;
}

.form-content {
	.form-item {
		margin-bottom: 30rpx;
		
		.form-label {
			font-size: 28rpx;
			color: #333;
			margin-bottom: 16rpx;
			display: block;
		}
		
		.picker-text {
			padding: 20rpx;
			background: #f5f5f5;
			border-radius: 8rpx;
			font-size: 28rpx;
			color: #333;
			position: relative;
			
			&::after {
				content: '';
				position: absolute;
				right: 20rpx;
				top: 50%;
				transform: translateY(-50%);
				width: 0;
				height: 0;
				border-left: 8rpx solid transparent;
				border-right: 8rpx solid transparent;
				border-top: 8rpx solid #999;
			}
		}
		
		.form-textarea {
			width: 100%;
			min-height: 120rpx;
			padding: 20rpx;
			background: #f5f5f5;
			border-radius: 8rpx;
			font-size: 28rpx;
			color: #333;
			border: none;
			box-sizing: border-box;
		}
		
		.file-upload {
			.upload-btn {
				display: flex;
				align-items: center;
				justify-content: center;
				padding: 30rpx;
				background: #f5f5f5;
				border: 2rpx dashed #ccc;
				border-radius: 8rpx;
				margin-bottom: 20rpx;
				
				.upload-icon {
					width: 40rpx;
					height: 40rpx;
					margin-right: 16rpx;
				}
				
				.upload-text {
					font-size: 28rpx;
					color: #666;
				}
			}
			
			.file-list {
				.file-item {
					display: flex;
					align-items: center;
					padding: 20rpx;
					background: #f9f9f9;
					border-radius: 8rpx;
					margin-bottom: 16rpx;
					
					.file-icon {
						width: 32rpx;
						height: 32rpx;
						margin-right: 16rpx;
					}
					
					.file-name {
						flex: 1;
						font-size: 26rpx;
						color: #333;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
					}
					
					.file-delete {
						width: 40rpx;
						height: 40rpx;
						display: flex;
						align-items: center;
						justify-content: center;
						background: #ff4757;
						color: #fff;
						border-radius: 50%;
						font-size: 24rpx;
						font-weight: bold;
					}
				}
			}
		}
	}
}

.form-actions {
	margin-top: 40rpx;
	
	.btn-submit {
		width: 100%;
		height: 80rpx;
		background: #ff6b35;
		color: #fff;
		border: none;
		border-radius: 8rpx;
		font-size: 28rpx;
		font-weight: bold;
	}
}

.function-menu {
	background: #fff;
	border-radius: 16rpx;
	overflow: hidden;
	margin-bottom: 20rpx;
	box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}

// 文件上传样式
.upload-container {
	margin-top: 20rpx;
}

.upload-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 200rpx;
	height: 150rpx;
	border: 2rpx dashed #ddd;
	border-radius: 8rpx;
	background-color: #fafafa;
	margin-bottom: 20rpx;
	
	.upload-icon {
		width: 48rpx;
		height: 48rpx;
		margin-bottom: 10rpx;
	}
	
	.upload-text {
		font-size: 24rpx;
		color: #999;
		text-align: center;
	}
}

.file-list {
	.file-item {
		display: flex;
		align-items: center;
		padding: 20rpx;
		border: 1rpx solid #eee;
		border-radius: 8rpx;
		margin-bottom: 10rpx;
		background: #fff;
		width: 100%;
		box-sizing: border-box;
		
		.file-preview {
			width: 80rpx;
			height: 80rpx;
			border-radius: 4rpx;
			object-fit: cover;
			margin-right: 20rpx;
			flex-shrink: 0; // 防止预览区域被压缩
			
			&.video-preview {
				background: #000;
				display: flex;
				align-items: center;
				justify-content: center;
				position: relative;
				
				&::after {
					content: '▶';
					color: #fff;
					font-size: 32rpx;
					position: absolute;
				}
			}
			
			&.document-preview {
				background: #f5f5f5;
				display: flex;
				align-items: center;
				justify-content: center;
				border: 1rpx solid #ddd;
				
				.document-icon {
					width: 40rpx;
					height: 40rpx;
				}
			}
		}
		
		.file-info {
			flex: 1;
			min-width: 0; // 允许flex子项收缩
			
			.file-name {
				display: block;
				font-size: 26rpx;
				color: #333;
				margin-bottom: 8rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
				max-width: 100%;
				word-break: break-all;
			}
			
			.file-size {
				font-size: 22rpx;
				color: #999;
				margin-right: 10rpx;
			}
			
			.file-type {
				font-size: 20rpx;
				color: #666;
				background: #f0f0f0;
				padding: 2rpx 6rpx;
				border-radius: 4rpx;
				display: inline-block;
			}
		}
		
		.file-actions {
			flex-shrink: 0; // 防止删除按钮被压缩
			margin-left: 10rpx;
			
			.action-btn {
				font-size: 22rpx;
				color: #ff4444;
				padding: 6rpx 12rpx;
				border-radius: 4rpx;
				background: #fff5f5;
				border: 1rpx solid #ffcccc;
				white-space: nowrap;
				
				&.delete {
					background: #fff5f5;
					color: #ff4444;
				}
			}
		}
	}
}

.menu-item {
	display: flex;
	align-items: center;
	padding: 30rpx;
	border-bottom: 1rpx solid #f0f0f0;
	
	&:last-child {
		border-bottom: none;
	}
	
	.menu-icon {
		width: 48rpx;
		height: 48rpx;
		margin-right: 20rpx;
	}
	
	.menu-text {
		flex: 1;
		font-size: 28rpx;
		color: #333;
	}
	
	.menu-arrow {
		width: 24rpx;
		height: 24rpx;
	}
}

// 申请状态卡片样式
.apply-status-card {
	background: #fff;
	border-radius: 16rpx;
	padding: 30rpx;
	margin-bottom: 20rpx;
	box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);

	.status-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 20rpx;

		.status-title {
			font-size: 32rpx;
			font-weight: 600;
			color: #333;
		}

		.status-badge {
			padding: 8rpx 16rpx;
			border-radius: 20rpx;
			font-size: 24rpx;
			font-weight: 500;

			&.status-pending {
				background: #fff3cd;
				color: #856404;
			}

			&.status-approved {
				background: #d4edda;
				color: #155724;
			}

			&.status-rejected {
				background: #f8d7da;
				color: #721c24;
			}
		}
	}

	.status-content {
		.info-row {
			display: flex;
			margin-bottom: 16rpx;

			&:last-child {
				margin-bottom: 0;
			}

			.label {
				font-size: 28rpx;
				color: #666;
				width: 160rpx;
				flex-shrink: 0;
			}

			.value {
				font-size: 28rpx;
				color: #333;
				flex: 1;

				&.reject-reason {
					color: #e74c3c;
				}
			}
		}
	}
}
